<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" type="text/css" href="/misc/css/base.css"  />
<link rel="stylesheet" type="text/css" href="/misc/css/btnicon.css"  />
<link rel="stylesheet" type="text/css" href="/misc/css/reset_admin.css"  />
<link rel="stylesheet" type="text/css" href="/misc/css/adminmenu.css"  />
<link rel="stylesheet" type="text/css" href="/misc/css/newadmin.css"  />
<script type="text/javascript" src="/misc/vendors/jquery/jquery_1.2.6.js"></script>
<script type="text/javascript" src="/misc/vendors/o2js/o2js.js"></script>
<script type="text/javascript" src="/misc/vendors/o2js/o2js_build.js"></script>
<script type="text/javascript" >
var baseUrl = "<?=$themeUrl?>";
$().ready(function(){

});
var grids;
</script>
</head>
<style type="text/css">

 
</style>
<body   style="background-color:#fcfcfc"> 
<script type="text/javascript">
var url_save = '/user/addfriend'; 

$().ready(function(){  
	showLoading();  
});
/* 保存 */
function fnSave(){ 
	var form = serializeObj("#myform");
	if($.trim(form.name) == ''){
		alert('请输入【称呼】');
		$('#name').focus();
		return false;
	}
  $('button').attr('disabled','disabled');
	$.ajax({
		async:true,
		type:'post',
		url:url_save,
		data:{
			form:JSON.encode(form)
		},
		success:function(e){
  		$('button').attr('disabled','');
			var ok = errorHandler(e);
			if(ok){　 
				<?PHP
				if(isset($_GET['endfunc'])){
					echo 'parent.'.$_GET['endfunc'].'(ok.body_id);';
				}
				?>
				fnReturn();
			}
		}
	});
}
/* 返回 */
function fnReturn(){
	if(defined(parent) && defined(parent.ymPrompt)){
		parent.ymPrompt.close();
	}else{
		window.close();
	}
}
</script>
<div style="margin:10px;">
	<div class="blockdiv">
		<div class="titlediv">请输入家人朋友信息</div>
		<form id="myform" action="" method="post" onsubmit="return false" >
			<table class="mytable" > 
				<tr>
					<td class="mylabel"> 称呼：</td>
					<td class="myinfo" >
						<input type="text" class="textBox" id="name" name="name" value=""  maxlength="10" style="width:200px" /> 
					</td> 
				</tr>
				<tr> 
					<td class="mylabel">性别：</td>
					<td class="myinfo" >
						<select class="textBox" id="sex" name="sex" style="width:200px"  >
							<option value="男">男</option>
							<option value="女">女</option>
						</select>
					</td>  
				</tr>
			</table>	
		</form>		
	</div>
</div>		
<div  class="button_div">
		<button class=" " onclick="fnSave()">保 存</button>
		<span class="gray">或</span> 
		<a href="#" onclick="fnReturn()">取 消</a>
</div> 
</body>
</html>